/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model.impl;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.CacheModel;

import de.hsmannheim.pepa.patientenportal.apanwep.model.messages_mobjects;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

/**
 * The cache model class for representing messages_mobjects in entity cache.
 *
 * @author Cedric Nana
 * @see messages_mobjects
 * @generated
 */
public class messages_mobjectsCacheModel implements CacheModel<messages_mobjects>,
	Externalizable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(5);

		sb.append("{messages_ID=");
		sb.append(messages_ID);
		sb.append(", messageobjects_id=");
		sb.append(messageobjects_id);
		sb.append("}");

		return sb.toString();
	}

	@Override
	public messages_mobjects toEntityModel() {
		messages_mobjectsImpl messages_mobjectsImpl = new messages_mobjectsImpl();

		messages_mobjectsImpl.setMessages_ID(messages_ID);
		messages_mobjectsImpl.setMessageobjects_id(messageobjects_id);

		messages_mobjectsImpl.resetOriginalValues();

		return messages_mobjectsImpl;
	}

	@Override
	public void readExternal(ObjectInput objectInput) throws IOException {
		messages_ID = objectInput.readLong();
		messageobjects_id = objectInput.readLong();
	}

	@Override
	public void writeExternal(ObjectOutput objectOutput)
		throws IOException {
		objectOutput.writeLong(messages_ID);
		objectOutput.writeLong(messageobjects_id);
	}

	public long messages_ID;
	public long messageobjects_id;
}